package classes;

public class SynchronizedDemo {

    private void doSomething() {}

    public void test(Object f) {
        synchronized (f) {
            doSomething();
        }
    }

    public static void main(String[] args) {
        new SynchronizedDemo().test(new Object());
    }
}
